package com.hos.service;

import com.hos.dao.PatientMapper;

import com.hos.pojo.Patient;
import com.hos.pojo.PostCard;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
public class PatientService {
    @Resource
    public PatientMapper patientMapper;

    public int count(Map<String, Object> param) {
        return patientMapper.count(param);
    }

    public List<Patient> getPageResult(Map<String, Object> param) {
        return patientMapper.selectPageResult(param);
    }

    public void modify(Patient entity) {
        patientMapper.update(entity);
    }

    public void add(Patient entity) {
        patientMapper.insert(entity);
    }

    public Patient get(Integer id) {
        return patientMapper.select(id);
    }

    public void removes(Integer[] ids) {
        patientMapper.deletes(ids);
    }
}
